package psd.model.Scala.Converters;

import org.eclipse.jdt.core.dom.MethodDeclaration;

import psd.model.IConverter;
import psd.scala.FactDb;
import psd.scala.ScalaConverter;
import psd.scala.facts.MethodDefT;

public class ScalaMethodDeclarationConverter extends ScalaConverter implements
IConverter<MethodDeclaration> {

	public ScalaMethodDeclarationConverter(FactDb fdb) {
		super(fdb);
	}

	@Override
	public boolean convert(MethodDeclaration node) {
		MethodDefT fact = new MethodDefT(node.hashCode(),
										this.getLineNumber(node),
										this.getFilePath(node),
										node.getModifiers());

		this.fdb.addMethodDef(fact);
				
		return true;
	}

}
